<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class historialPagos extends CI_Controller {

    public function __construct() {
        parent::__construct();
        session_start();
        $this->load->model('historial_pago_afiliacionm');
    }

    public function index() {
        if (empty($_SESSION["estaLogueado"])) {
            header("location://{$_SERVER['HTTP_HOST']}/entrar");
            exit();
        }
        $data = array();
        $this->loadData($data);
        $this->load->view('header', $data);
        $this->load->view('historialPagosV');
        $this->load->view('footer');
    }

    public function loadData(&$data) {
        $data["tab"] = "historialPagos";
        $data["pagos"] = $this->historial_pago_afiliacionm->obtenerPagos($_SESSION["establecimiento"]["id_establecimiento"]);
    }

}

